using System;
using AZROLESLib;

namespace AzManContrib.MVC.Decorators
{
    public class AzManApplicationDecorator : IAzManApplication
    {
        private readonly IAzApplication _surrogate;

        public AzManApplicationDecorator(IAzApplication surrogate)
        {
            _surrogate = surrogate;
        }

        public object GetProperty(int lPropId, object varReserved)
        {
            return _surrogate.GetProperty(lPropId, varReserved);
        }

        public void SetProperty(int lPropId, object varProp, object varReserved)
        {
            _surrogate.SetProperty(lPropId, varProp, varReserved);
        }

        public void AddPolicyAdministrator(string bstrAdmin, object varReserved)
        {
            _surrogate.AddPolicyAdministrator(bstrAdmin, varReserved);
        }

        public void DeletePolicyAdministrator(string bstrAdmin, object varReserved)
        {
            _surrogate.DeletePolicyAdministrator(bstrAdmin, varReserved);
        }

        public void AddPolicyReader(string bstrReader, object varReserved)
        {
            _surrogate.AddPolicyReader(bstrReader, varReserved);
        }

        public void DeletePolicyReader(string bstrReader, object varReserved)
        {
            _surrogate.DeletePolicyReader(bstrReader, varReserved);
        }

        public IAzScope OpenScope(string bstrScopeName, object varReserved)
        {
            return _surrogate.OpenScope(bstrScopeName, varReserved);
        }

        public IAzScope CreateScope(string bstrScopeName, object varReserved)
        {
            return _surrogate.CreateScope(bstrScopeName, varReserved);
        }

        public void DeleteScope(string bstrScopeName, object varReserved)
        {
            _surrogate.DeleteScope(bstrScopeName, varReserved);
        }

        public IAzOperation OpenOperation(string bstrOperationName, object varReserved)
        {
            return _surrogate.OpenOperation(bstrOperationName, varReserved);
        }

        public IAzOperation CreateOperation(string bstrOperationName, object varReserved)
        {
            return _surrogate.CreateOperation(bstrOperationName, varReserved);
        }

        public void DeleteOperation(string bstrOperationName, object varReserved)
        {
            _surrogate.DeleteOperation(bstrOperationName, varReserved);
        }

        public IAzTask OpenTask(string bstrTaskName, object varReserved)
        {
            return _surrogate.OpenTask(bstrTaskName, varReserved);
        }

        public IAzTask CreateTask(string bstrTaskName, object varReserved)
        {
            return _surrogate.CreateTask(bstrTaskName, varReserved);
        }

        public void DeleteTask(string bstrTaskName, object varReserved)
        {
            _surrogate.DeleteTask(bstrTaskName, varReserved);
        }

        public IAzApplicationGroup OpenApplicationGroup(string bstrGroupName, object varReserved)
        {
            return _surrogate.OpenApplicationGroup(bstrGroupName, varReserved);
        }

        public IAzApplicationGroup CreateApplicationGroup(string bstrGroupName, object varReserved)
        {
            return _surrogate.CreateApplicationGroup(bstrGroupName, varReserved);
        }

        public void DeleteApplicationGroup(string bstrGroupName, object varReserved)
        {
            _surrogate.DeleteApplicationGroup(bstrGroupName, varReserved);
        }

        public IAzRole OpenRole(string bstrRoleName, object varReserved)
        {
            return _surrogate.OpenRole(bstrRoleName, varReserved);
        }

        public IAzRole CreateRole(string bstrRoleName, object varReserved)
        {
            return _surrogate.CreateRole(bstrRoleName, varReserved);
        }

        public void DeleteRole(string bstrRoleName, object varReserved)
        {
            _surrogate.DeleteRole(bstrRoleName, varReserved);
        }

        public IAzClientContext InitializeClientContextFromToken(ulong ullTokenHandle, object varReserved)
        {
            return _surrogate.InitializeClientContextFromToken(ullTokenHandle, varReserved);
        }

        public void AddPropertyItem(int lPropId, object varProp, object varReserved)
        {
            _surrogate.AddPropertyItem(lPropId, varProp, varReserved);
        }

        public void DeletePropertyItem(int lPropId, object varProp, object varReserved)
        {
            _surrogate.DeletePropertyItem(lPropId, varProp, varReserved);
        }

        public void Submit(int lFlags, object varReserved)
        {
            _surrogate.Submit(lFlags, varReserved);
        }

        public IAzClientContext InitializeClientContextFromName(string clientName, string domainName, object varReserved)
        {
            return _surrogate.InitializeClientContextFromName(clientName, domainName, varReserved);
        }

        public void AddDelegatedPolicyUser(string bstrDelegatedPolicyUser, object varReserved)
        {
            _surrogate.AddDelegatedPolicyUser(bstrDelegatedPolicyUser, varReserved);
        }

        public void DeleteDelegatedPolicyUser(string bstrDelegatedPolicyUser, object varReserved)
        {
            _surrogate.DeleteDelegatedPolicyUser(bstrDelegatedPolicyUser, varReserved);
        }

        public IAzClientContext InitializeClientContextFromStringSid(string sidString, int lOptions, object varReserved)
        {
            return _surrogate.InitializeClientContextFromStringSid(sidString, lOptions, varReserved);
        }

        public void AddPolicyAdministratorName(string bstrAdmin, object varReserved)
        {
            _surrogate.AddPolicyAdministratorName(bstrAdmin, varReserved);
        }

        public void DeletePolicyAdministratorName(string bstrAdmin, object varReserved)
        {
            _surrogate.DeletePolicyAdministratorName(bstrAdmin, varReserved);
        }

        public void AddPolicyReaderName(string bstrReader, object varReserved)
        {
            _surrogate.AddPolicyReaderName(bstrReader, varReserved);
        }

        public void DeletePolicyReaderName(string bstrReader, object varReserved)
        {
            _surrogate.DeletePolicyReaderName(bstrReader, varReserved);
        }

        public void AddDelegatedPolicyUserName(string bstrDelegatedPolicyUser, object varReserved)
        {
            _surrogate.AddDelegatedPolicyUserName(bstrDelegatedPolicyUser, varReserved);
        }

        public void DeleteDelegatedPolicyUserName(string bstrDelegatedPolicyUser, object varReserved)
        {
            _surrogate.DeleteDelegatedPolicyUserName(bstrDelegatedPolicyUser, varReserved);
        }

        public string Name
        {
            get { return _surrogate.Name; }
            set { _surrogate.Name = value; }
        }

        public string Description
        {
            get { return _surrogate.Description; }
            set { _surrogate.Description = value; }
        }

        public string ApplicationData
        {
            get { return _surrogate.ApplicationData; }
            set { _surrogate.ApplicationData = value; }
        }

        public string AuthzInterfaceClsid
        {
            get { return _surrogate.AuthzInterfaceClsid; }
            set { _surrogate.AuthzInterfaceClsid = value; }
        }

        public string Version
        {
            get { return _surrogate.Version; }
            set { _surrogate.Version = value; }
        }

        public int GenerateAudits
        {
            get { return _surrogate.GenerateAudits; }
            set { _surrogate.GenerateAudits = value; }
        }

        public int ApplyStoreSacl
        {
            get { return _surrogate.ApplyStoreSacl; }
            set { _surrogate.ApplyStoreSacl = value; }
        }

        public int Writable
        {
            get { return _surrogate.Writable; }
        }

        public object PolicyAdministrators
        {
            get { return _surrogate.PolicyAdministrators; }
        }

        public object PolicyReaders
        {
            get { return _surrogate.PolicyReaders; }
        }

        public IAzScopes Scopes
        {
            get { return _surrogate.Scopes; }
        }

        public IAzOperations Operations
        {
            get { return _surrogate.Operations; }
        }

        public IAzTasks Tasks
        {
            get { return _surrogate.Tasks; }
        }

        public IAzApplicationGroups ApplicationGroups
        {
            get { return _surrogate.ApplicationGroups; }
        }

        public IAzRoles Roles
        {
            get { return _surrogate.Roles; }
        }

        public object DelegatedPolicyUsers
        {
            get { return _surrogate.DelegatedPolicyUsers; }
        }

        public object PolicyAdministratorsName
        {
            get { return _surrogate.PolicyAdministratorsName; }
        }

        public object PolicyReadersName
        {
            get { return _surrogate.PolicyReadersName; }
        }

        public object DelegatedPolicyUsersName
        {
            get { return _surrogate.DelegatedPolicyUsersName; }
        }

        public IAzManClientContext InitializeClientContextFromToken(IntPtr userToken)
        {
            return new AzManClientContextDecorator(_surrogate.InitializeClientContextFromToken((ulong) userToken, null));
        }
    }
}